package com.zhang.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 操作日志表
 * </p>
 *
 * @author Zhang
 * @since 2022-03-02
 */
@Getter
@Setter
@TableName("tb_log")
@ApiModel(value = "Log对象", description = "操作日志表")
public class Log implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("日志ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("操作用户")
    private String username;

    @ApiModelProperty("操作内容")
    private String operation;

    @ApiModelProperty("耗时")
    private BigDecimal time;

    @ApiModelProperty("操作方法")
    private String method;

    @ApiModelProperty("方法参数")
    private String params;

    @ApiModelProperty("操作者IP")
    private String ip;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("操作地点")
    private String location;


}
